﻿<cfsilent>
	<cfscript>
		
		stringAdvice = getProperty("serviceFactory").getBean("stringAdvice");
		
		event.setArg("pageTitle", "教学质量评价 - 评价指标体系设置向导");
		
		currentTab = event.getArg("TabID", "labQuestion");
		
		evsId = event.getArg("ES");
		tagId = event.getArg("TAG");
		parentTagOrder = event.getArg("PTO");
		levelOrder = event.getArg("LO");
		
		passArgs = structNew();
		structInsert( passArgs, "ES", evsId );
		
		if ( len(parentTagOrder) and len(levelOrder) ) {
			currentTab = event.getArg("TabID", "labCreate");
		}
		
		if ( len(tagId) ) {
			currentTab = event.getArg("TabID", "labEdit");
			
			sql = "SELECT tag_order, tag_weight, question, m_id FROM t_target WHERE tag_id = :tagId ";
			
			queryObj = new Query( datasource=application.dnsSlave );
			queryObj.addParam( name="tagId", value=tagId, cfsqltype="cf_sql_char" );

			rs_tag = queryObj.execute( sql=sql ).getResult();
			
		}
		
		
		/* 评价体系相关设置 */
		sql = "SELECT 
				es_name, es_model, es_level 
				FROM t_evaluate_system 
				WHERE 
					es_id = :evsId ";
		
		queryObj = new Query( datasource=application.dnsSlave );
		queryObj.addParam( name="evsId", value=evsId, cfsqltype="cf_sql_char" );

		rs_evs = queryObj.execute( sql=sql ).getResult();
		
		/* 一级指标 */
		sql = "SELECT question, tag_order FROM t_target 
				WHERE 
					es_id = :evsId 
					AND level_order IN ( :stageIds ) 
					AND tag_order LIKE '__00' 
					ORDER BY tag_order ";
		
		queryObj = new Query( datasource=application.dnsSlave );

		queryObj.addParam( name="evsId", value=evsId, cfsqltype="cf_sql_char" );
		queryObj.addParam( name="stageIds", value="1,2,3", cfsqltype="cf_sql_char", list=true );

		rs_level = queryObj.execute( sql=sql ).getResult();
		
		/* 预设答案 */
		sql = "SELECT 
				m_id, options 
				FROM t_measure_set 
				WHERE m_id <> 'NOP'
				ORDER BY m_id ";
		
		queryObj = new Query( datasource=application.dnsSlave );
		
		rs_measure = queryObj.execute( sql=sql ).getResult();

	</cfscript>
</cfsilent>

<div id="headArea">
	<div class="uiHeader uiHeaderWithImage ptm">
		<div class="clearfix uiHeaderTop">
			<div class="uiHeaderActions rfloat">
				<a class="uiButton" href="<cfoutput>#buildURL('evaluateSystem')#</cfoutput>"><i class="mrs img btnList"></i><span class="uiButtonText">评价指标体系</span></a>
			</div>
			<div>
				<h2 class="uiHeaderTitle">
					<i class="uiHeaderImage img icon16x16 card"></i>评价指标体系设置向导
				</h2>
			</div>
		</div>
	</div>
</div>

<!--- 加载导航菜单 --->
<!-- stepMenu-->
<cfoutput>#event.getArg("stepMenu")#</cfoutput>
<!--/stepMenu-->

<div class="UIElement">
	<ul class="senateFirstPage">
		<li>
			<div class="clearfix" id="summary">
				<div class="UItab">
					<div class="tabLables">
						<span <cfif currentTab eq "labQuestion">class="active"</cfif> id="labQuestion" tabTarget="Question">指标体系架构</span>
						<span <cfif currentTab eq "labRemove">class="active"</cfif> id="labRemove" tabTarget="Remove">删除</span>
						<cfif rs_level.recordCount>
							<cfif len(parentTagOrder) and len(levelOrder)>
								<span <cfif currentTab eq "labCreate">class="active"</cfif> id="labCreate" tabTarget="Create">添加观测点</span>
							</cfif>
							<cfif len(tagId)>
								<span <cfif currentTab eq "labEdit">class="active"</cfif> id="labEdit" tabTarget="Edit">编辑观测点</span>
							</cfif>
						</cfif>
					</div>
				</div>
				<script language="javascript" type="text/javascript">
					//<![CDATA[
					<!--
					$(document).ready(function() {
						
						/* init Tab */
						$("div.tabContent").hide();
						$("div#" + $("div.tabLables span.active").attr("tabTarget")).show();
						
						$("div.tabLables > span").click(function(){
							var $targetID = $(this).attr("tabTarget");
							
							$("div.tabLables span").removeClass("active");
							$(this).addClass("active");
							
							$("div.tabContent").not('[id="' + $targetID + '"]').hide();
							$("div.tabContent#" + $targetID).show();
						});
						
					});
					// -->
					//]]>				
				</script>
				
				<div id="Question" class="tabContent">
					
					<div class="noticeBlock">
						<div class="operation">
							<a class="uiButton" href="<cfoutput>#buildURL('evaluateSystemSetupWizardPreview', passArgs)#</cfoutput>"><i class="mrs img btnList"></i><span class="uiButtonText">预览</span></a>
						</div>
						<h3><cfoutput>#rs_evs.es_name#</cfoutput></h3>
						<hr/>
					</div>
					
					<!--- 两阶段评教 --->
					<cfif rs_evs.es_model eq "M2">
						
						<script language="javascript" type="text/javascript">
							//<![CDATA[
							<!--
							function showStageForm( stageId ) {
								
								var $form = $("#formStage-" + stageId);
								var $block = $("#blockStage-" + stageId);
								
								$block.addClass("hidden_elem");
								$form.removeClass("hidden_elem");
							}
							
							function hideStageForm( stageId ) {
								
								var $form = $("#formStage-" + stageId);
								var $block = $("#blockStage-" + stageId);
								
								$form.addClass("hidden_elem");
								$block.removeClass("hidden_elem");
							}
							// -->
							//]]>				
						</script>
						
						<cfloop from="1" to="2" index="stageId">
							
							<cfset structInsert( passArgs, "LO", stageId, true ) />
							
							<div class="noticeBlock">
								<cfif stageId eq 1>
									<h2>课程进行期间</h2>
									<cfelse>
									<h2>课程结束后</h2>
								</cfif>
								<p>如需添加该阶段的一级指标, <a href="javascript:showStageForm(<cfoutput>#stageId#</cfoutput>);">点这里添加</a></p>
								<hr/>
							</div>
							
							<cfscript>
								/* 一级指标 */
								sql = "SELECT question, tag_order, tag_weight FROM t_target 
										WHERE 
											es_id = :evsId 
											AND level_order = :stageId 
											AND tag_order LIKE '__00' 
										ORDER BY tag_order ";
		
								queryObj = new Query( datasource=application.dnsSlave );
								
								queryObj.addParam( name="evsId", value=evsId, cfsqltype="cf_sql_char" );
								queryObj.addParam( name="stageId", value=stageId, cfsqltype="cf_sql_char" );

								rs_L1 = queryObj.execute( sql=sql ).getResult();

							</cfscript>
							
							<form id="formStage-<cfoutput>#stageId#</cfoutput>" onSubmit="javascript:return processVerfiyForm('formStage-<cfoutput>#stageId#</cfoutput>');"  class="formWrapper hidden_elem" method="post" action="<cfoutput>#buildURL('evaluateSystemLevelTagCreateDo')#</cfoutput>">
								
								<input name="ES" type="hidden" value="<cfoutput>#evsId#</cfoutput>" />
								<input name="LO" type="hidden" value="<cfoutput>#stageId#</cfoutput>" />
								
								<div class="label">
									<b>名称</b>
									<input name="LevelTitle" verification="required" type="text" class="typeText typeTextShort" maxlength="40" />
								</div>
								
								<div class="label">
									<b>权重分值</b>
									<input name="Weight" verification="integer" type="text" class="typeTinyInt" maxlength="3" value="1" />
								</div>
								
								
								<hr/>
								
								<div class="lable">
									<input class="button" type="submit" value="添加" />
									<input class="button2" onclick="hideStageForm(<cfoutput>#stageId#</cfoutput>);" type="button" value="取消" />
								</div>
								
							</form>
							
							<form id="formStage-<cfoutput>#stageId#</cfoutput>" onSubmit="javascript:return processVerfiyForm('formStage-<cfoutput>#stageId#</cfoutput>');"  class="formWrapper hidden_elem" method="post" action="<cfoutput>#buildURL('evaluateSystemLevelTagCreateDo')#</cfoutput>">
								
								<input name="ES" type="hidden" value="<cfoutput>#evsId#</cfoutput>" />
								<input name="LevelOrder" type="hidden" value="<cfoutput>#stageId#</cfoutput>" />
							
							</form>
							
							<div id="blockStage-<cfoutput>#stageId#</cfoutput>">
	
								<cfif rs_L1.recordCount>
								
										<!--- 循环一级指标 --->
										<cfloop query="rs_L1">
											
											<cfset structInsert( passArgs, "PTO", rs_L1.tag_order, true ) />
											
											<div class="noticeBlock">
												<h3><cfoutput>#stringAdvice.XHTMLSafeFormat( rs_L1.question )#</cfoutput> <small><cfoutput>#rs_L1.tag_weight#</cfoutput> Point</small></h3>
												<p><span class="img icon16x16 message"></span>下列是一级指标下的观测点列表, 如需添加新的观测点, <a href="<cfoutput>#buildURL('evaluateSystemSetupWizardQuestion', passArgs)#</cfoutput>">点这里进行添加</a></p>
											</div>

											<cfscript>
												/* 二级指标 */
												sql = "SELECT 
														tag_id, tag_weight, question, options 
														FROM t_target 
														INNER JOIN t_measure_set ON t_measure_set.m_id = t_target.m_id 
														WHERE 
															es_id = :evsId 
															AND level_order = :stageId 
															AND tag_order LIKE :stageCondition 
															AND tag_order > :stageOrderId 
														ORDER BY tag_order ";

												queryObj = new Query( datasource=application.dnsSlave );

												queryObj.addParam( name="evsId", value=evsId, cfsqltype="cf_sql_char" );
												queryObj.addParam( name="stageId", value=stageId, cfsqltype="cf_sql_char" );
												queryObj.addParam( name="stageOrderId", value=rs_L1.tag_order, cfsqltype="cf_sql_char" );
												queryObj.addParam( name="stageCondition", value=left(rs_L1.tag_order,2)&"__", cfsqltype="cf_sql_char" );

												rs_L2 = queryObj.execute( sql=sql ).getResult();

											</cfscript>
											
											<cfif rs_L2.recordCount>
											
													<cfset row = 0 />
													<table class="UIEditable">
														<thead>
															<tr>
																<td width="18"></td>
																<td>观测点</td>
																<td width="40">权重</td>
																<td width="160">选项</td>
																<td width="20"></td>
																<td width="20"></td>
																<td width="20"></td>
															</tr>
														</thead>
														<tbody>
															<cfloop query="rs_L2">
														
																<cfset row++ />
																<cfset structInsert( passArgs, "TAG", rs_L2.tag_id, true ) />
														
																<tr class="editRows">
																	<td><span class="index"><cfoutput>#row#</cfoutput></span></td>
																	<td><cfoutput>#stringAdvice.XHTMLSafeFormat( rs_L2.question )#</cfoutput></td>
																	<td><span class="numeric"><cfoutput>#rs_L2.tag_weight#</cfoutput></span></td>
																	<td><cfoutput>#rs_L2.options#</cfoutput></td>
																	<td>
																		<!--- 若不是第一个 则可上移 --->
																		<cfif row gt 1>
																			<cfset structInsert( passArgs, "TAG_NEXT", rs_L2["tag_id"][row-1], true ) />
																			<a class="stat up" href="<cfoutput>#buildURL('evaluateSystemTagSwapDo', passArgs)#</cfoutput>"></a>
																			<cfset structDelete( passArgs, "TAG_NEXT", false ) />
																		</cfif>
																	</td>
																	<td>
																		<!--- 若不是最后一个 则可上移 --->
																		<cfif row lt rs_L2.recordCount>
																			<cfset structInsert( passArgs, "TAG_NEXT", rs_L2["tag_id"][row+1], true ) />
																			<a class="stat down" href="<cfoutput>#buildURL('evaluateSystemTagSwapDo', passArgs)#</cfoutput>"></a>
																			<cfset structDelete( passArgs, "TAG_NEXT", false ) />
																		</cfif>
																	</td>
																	<td><a class="stat edit" href="<cfoutput>#buildURL('evaluateSystemSetupWizardQuestion', passArgs)#</cfoutput>"></a></td>
																</tr>
															</cfloop>
															<!--- 移出参数 --->
															<cfset structDelete( passArgs, "TAG" ) />
														</tbody>
													</table>
												
												<cfelse>
													
													<div class="systemNotice">
														<p>还没有设置观测点, 如该一级指标不再使用, <a href="<cfoutput>#buildURL('evaluateSystemLevelTagRemoveDo', passArgs)#</cfoutput>">可以在这里进行删除</a></p>
													</div>
													
											</cfif>

										</cfloop>
										
										<!--- 移出参数 --->
										<cfset structDelete( passArgs, "PTO" ) />
										

									<cfelse>
										<div class="systemNotice">
											<p>没有建立一级指标</p>
										</div>
								</cfif>
							
							</div>
							
						</cfloop>
						
						<!--- 移出参数 --->
						<cfset structDelete( passArgs, "LO" ) />
						
					</cfif>
					
					
					
					<!--- 三阶段评教 --->
					<cfif rs_evs.es_model eq "M3">
						
						<script language="javascript" type="text/javascript">
							//<![CDATA[
							<!--
							function showStageForm( stageId ) {
								
								var $form = $("#formStage-" + stageId);
								var $block = $("#blockStage-" + stageId);
								
								$block.addClass("hidden_elem");
								$form.removeClass("hidden_elem");
							}
							
							function hideStageForm( stageId ) {
								
								var $form = $("#formStage-" + stageId);
								var $block = $("#blockStage-" + stageId);
								
								$form.addClass("hidden_elem");
								$block.removeClass("hidden_elem");
							}
							// -->
							//]]>				
						</script>

						<cfloop from="1" to="3" index="stageId">
							
							<cfset structInsert( passArgs, "LO", stageId, true ) />

							<div class="noticeBlock">
								<h2>第<cfoutput>#stringAdvice.ChineseNumber(stageId)#</cfoutput>阶段</h2>
								<p>如需添加该阶段的一级指标, <a href="javascript:showStageForm(<cfoutput>#stageId#</cfoutput>);">点这里添加</a></p>
								<hr/>
							</div>

							<cfscript>
								/* 一级指标 */
								sql = "SELECT question, tag_order, tag_weight FROM t_target 
										WHERE 
											es_id = :evsId 
											AND level_order = :stageId 
											AND tag_order LIKE '__00' 
										ORDER BY tag_order ";
		
								queryObj = new Query( datasource=application.dnsSlave );
								
								queryObj.addParam( name="evsId", value=evsId, cfsqltype="cf_sql_char" );
								queryObj.addParam( name="stageId", value=stageId, cfsqltype="cf_sql_char" );

								rs_L1 = queryObj.execute( sql=sql ).getResult();

							</cfscript>
							
							<form id="formStage-<cfoutput>#stageId#</cfoutput>" onSubmit="javascript:return processVerfiyForm('formStage-<cfoutput>#stageId#</cfoutput>');"  class="formWrapper hidden_elem" method="post" action="<cfoutput>#buildURL('evaluateSystemLevelTagCreateDo')#</cfoutput>">
								
								<input name="ES" type="hidden" value="<cfoutput>#evsId#</cfoutput>" />
								<input name="LO" type="hidden" value="<cfoutput>#stageId#</cfoutput>" />
								
								<div class="label">
									<b>名称</b>
									<input name="LevelTitle" verification="required" type="text" class="typeText typeTextShort" maxlength="40" />
								</div>
								
								<div class="label">
									<b>权重分值</b>
									<input name="Weight" verification="integer" type="text" class="typeTinyInt" maxlength="3" value="1" />
								</div>
								
								
								<hr/>
								
								<div class="lable">
									<input class="button" type="submit" value="添加" />
									<input class="button2" onclick="hideStageForm(<cfoutput>#stageId#</cfoutput>);" type="button" value="取消" />
								</div>
								
							</form>
							
							<form id="formStage-<cfoutput>#stageId#</cfoutput>" onSubmit="javascript:return processVerfiyForm('formStage-<cfoutput>#stageId#</cfoutput>');"  class="formWrapper hidden_elem" method="post" action="<cfoutput>#buildURL('evaluateSystemLevelTagCreateDo')#</cfoutput>">
								
								<input name="ES" type="hidden" value="<cfoutput>#evsId#</cfoutput>" />
								<input name="LevelOrder" type="hidden" value="<cfoutput>#stageId#</cfoutput>" />
							
							</form>
							
							<div id="blockStage-<cfoutput>#stageId#</cfoutput>">
	
								<cfif rs_L1.recordCount>
								
										<!--- 循环一级指标 --->
										<cfloop query="rs_L1">
											
											<cfset structInsert( passArgs, "PTO", rs_L1.tag_order, true ) />
											
											<div class="noticeBlock">
												<h3><cfoutput>#stringAdvice.XHTMLSafeFormat( rs_L1.question )#</cfoutput> <small><cfoutput>#rs_L1.tag_weight#</cfoutput> Point</small></h3>
												<p><span class="img icon16x16 message"></span>下列是一级指标下的观测点列表, 如需添加新的观测点, <a href="<cfoutput>#buildURL('evaluateSystemSetupWizardQuestion', passArgs)#</cfoutput>">点这里进行添加</a></p>
											</div>

											<cfscript>
												/* 二级指标 */
												sql = "SELECT 
														tag_id, tag_weight, question, options 
														FROM t_target 
														INNER JOIN t_measure_set ON t_measure_set.m_id = t_target.m_id 
														WHERE 
															es_id = :evsId 
															AND level_order = :stageId 
															AND tag_order LIKE :stageCondition 
															AND tag_order > :stageOrderId 
														ORDER BY tag_order ";

												queryObj = new Query( datasource=application.dnsSlave );

												queryObj.addParam( name="evsId", value=evsId, cfsqltype="cf_sql_char" );
												queryObj.addParam( name="stageId", value=stageId, cfsqltype="cf_sql_char" );
												queryObj.addParam( name="stageOrderId", value=rs_L1.tag_order, cfsqltype="cf_sql_char" );
												queryObj.addParam( name="stageCondition", value=left(rs_L1.tag_order,2)&"__", cfsqltype="cf_sql_char" );

												rs_L2 = queryObj.execute( sql=sql ).getResult();

											</cfscript>
											
											<cfif rs_L2.recordCount>
											
													<cfset row = 0 />
													<table class="UIEditable">
														<thead>
															<tr>
																<td width="18"></td>
																<td>观测点</td>
																<td width="40">权重</td>
																<td width="160">选项</td>
																<td width="20"></td>
																<td width="20"></td>
																<td width="20"></td>
															</tr>
														</thead>
														<tbody>
															<cfloop query="rs_L2">
														
																<cfset row++ />
																<cfset structInsert( passArgs, "TAG", rs_L2.tag_id, true ) />
														
																<tr class="editRows">
																	<td><span class="index"><cfoutput>#row#</cfoutput></span></td>
																	<td><cfoutput>#stringAdvice.XHTMLSafeFormat( rs_L2.question )#</cfoutput></td>
																	<td><span class="numeric"><cfoutput>#rs_L2.tag_weight#</cfoutput></span></td>
																	<td><cfoutput>#rs_L2.options#</cfoutput></td>
																	<td>
																		<!--- 若不是第一个 则可上移 --->
																		<cfif row gt 1>
																			<cfset structInsert( passArgs, "TAG_NEXT", rs_L2["tag_id"][row-1], true ) />
																			<a class="stat up" href="<cfoutput>#buildURL('evaluateSystemTagSwapDo', passArgs)#</cfoutput>"></a>
																			<cfset structDelete( passArgs, "TAG_NEXT", false ) />
																		</cfif>
																	</td>
																	<td>
																		<!--- 若不是最后一个 则可上移 --->
																		<cfif row lt rs_L2.recordCount>
																			<cfset structInsert( passArgs, "TAG_NEXT", rs_L2["tag_id"][row+1], true ) />
																			<a class="stat down" href="<cfoutput>#buildURL('evaluateSystemTagSwapDo', passArgs)#</cfoutput>"></a>
																			<cfset structDelete( passArgs, "TAG_NEXT", false ) />
																		</cfif>
																	</td>
																	<td><a class="stat edit" href="<cfoutput>#buildURL('evaluateSystemSetupWizardQuestion', passArgs)#</cfoutput>"></a></td>
																</tr>
															</cfloop>
															<!--- 移出参数 --->
															<cfset structDelete( passArgs, "TAG" ) />
														</tbody>
													</table>
												
												<cfelse>
													
													<div class="systemNotice">
														<p>还没有设置观测点, 如该一级指标不再使用, <a href="<cfoutput>#buildURL('evaluateSystemLevelTagRemoveDo', passArgs)#</cfoutput>">可以在这里进行删除</a></p>
													</div>
													
											</cfif>

										</cfloop>
										
										<!--- 移出参数 --->
										<cfset structDelete( passArgs, "PTO" ) />
										

									<cfelse>
										<div class="systemNotice">
											<p>没有建立一级指标</p>
										</div>
								</cfif>
							
							</div>

						</cfloop>
						
						<!--- 移出参数 --->
						<cfset structDelete( passArgs, "LO" ) />
						
					</cfif>

				</div>
				
				<div id="Remove" class="tabContent">
					
					<div class="systemNotice">
						<h3><span class="img icon16x16 info"></span>删除评价体系</h3>
						<p>注意: 删除一个评价体系信息的同时, 会同时删除与评价体系相关所有教学考评数据信息. </p>
						<p>如果您确定以后都不再使用该评价体系, 您可以在这里进行信息删除. 使用该评价体系的评价数据和结果, 由于数据完整性维护的强制性要求, 这些相关信息会被同样删除. </p>
					
						<form id="formRemove" class="formWrapper Transparent" method="post" action="<cfoutput>#buildURL('evaluateSystemRemoveDo')#</cfoutput>">
							<input name="ES" type="hidden" value="<cfoutput>#evsId#</cfoutput>" />
							<div class="lable"><input class="button2" type="submit" value="删除评价体系" /></div>
						</form>
					</div>
					
				</div>
				
				<cfif rs_level.recordCount and len(parentTagOrder) and len(levelOrder)>

					<div id="Create" class="tabContent">
						
						<div class="noticeBlock">
							<h3>设置新观察点</h3>
							<p><span class="img icon16x16 message"></span>设置问题时, 请注意预设答案的选择, 选择最符合问题语境的答案选项</p>
							<hr/>
						</div>
						
						<form id="formCreate" onSubmit="javascript:return processVerfiyForm('formCreate');" class="formWrapper" method="post" action="<cfoutput>#buildURL('evaluateSystemTagCreateDo')#</cfoutput>">
							
							<input name="ES" type="hidden" value="<cfoutput>#evsId#</cfoutput>" />
							<input name="LO" type="hidden" value="<cfoutput>#levelOrder#</cfoutput>" />
							
							<div class="label">
								<b>观测点</b>
								<input name="Question" verification="required" type="text" class="typeText" maxlength="180" value="" />
							</div>
							
							<div class="label">
								<b>权重分值</b>
								<input name="Weight" verification="integer" type="text" class="typeTinyInt" maxlength="3" value="1" />
							</div>
							
							<hr/>
							
							<div class="label">
								<b>一级指标</b>
								
								<div class="secondRow">
								
									<table width="98%">
										<tr>
										<cfset row = 0 />
										<cfset cellPerRow = 4 />
										<cfloop query="rs_level">
											<cfset row++ />
												<td>
													<input name="PTO" type="radio" class="typeRadio" value="<cfoutput>#rs_level.tag_order#</cfoutput>" <cfif parentTagOrder eq rs_level.tag_order>checked="checked"</cfif> /> 
													<cfoutput>#rs_level.question#</cfoutput>
												</td>
											<cfif row mod cellPerRow eq 0>
											</tr>
											<tr>
											</cfif>
										</cfloop>
										<cfif row eq rs_level.recordCount and rs_level.recordCount mod cellPerRow>
											<cfloop from="1" to="#cellPerRow-rs_level.recordCount mod cellPerRow#" index="i">
												<td><!-- <cfoutput>holder<cfoutput>#i#</cfoutput> --></cfoutput></td>
											</cfloop>
										</cfif>
										</tr>
									</table>
								
								</div>
								
							</div>
							
							<cfif rs_measure.recordCount >
							
								<div class="label">
									<b>预设答案</b>
									<div class="secondRow">
										<table>
											<cfset row = 0 />
												<cfloop query="rs_measure">
												<cfset row ++ />
												<tr>
													<td><input type="radio" name="Measure" class="typeRadio" value="<cfoutput>#rs_measure.m_id#</cfoutput>" <cfif row eq 1>checked="checked"</cfif> /> <cfoutput>#rs_measure.options#</cfoutput></td>
												</tr>
											</cfloop>
										</table>
									</div>
								</div>
							
								<hr/>
						
								<div class="lable">
									<input class="button" type="submit" value="添加" />
								</div>
								
								<cfelse>
								<div class="systemNotice">
									<p>您还没有设置参考选项, 无法添加评分观察点, <a href="<cfoutput>#buildURL('evaluateOptions')#</cfoutput>">请通过这里先设置需要的评分指标参考选项</a></p>
								</div>
								
							</cfif>

						</form>
						
					</div>
				
				</cfif>
				
				<cfif rs_level.recordCount and len(tagId)>
				
					<div id="Edit" class="tabContent">
						
						<div class="noticeBlock">
							<h3>修订观察点</h3>
							<p><span class="img icon16x16 message"></span>设置问题时, 请注意预设答案的选择, 选择最符合问题语境的答案选项</p>
							<hr/>
						</div>
						
						<form id="formEdit" onSubmit="javascript:return processVerfiyForm('formEdit');" class="formWrapper" method="post" action="<cfoutput>#buildURL('evaluateSystemTagModifyDo')#</cfoutput>">
							
							<input name="TAG" type="hidden" value="<cfoutput>#tagId#</cfoutput>" />
							<input name="ES" type="hidden" value="<cfoutput>#evsId#</cfoutput>" />
							<input name="LO" type="hidden" value="<cfoutput>#levelOrder#</cfoutput>" />
							
							<div class="label">
								<b>观测点</b>
								<input name="Question" verification="required" type="text" class="typeText" maxlength="180" value="<cfoutput>#stringAdvice.HTMLFormEncode( rs_tag.question )#</cfoutput>" />
							</div>
							
							<div class="label">
								<b>权重分值</b>
								<input name="Weight" verification="integer" type="text" class="typeTinyInt" maxlength="3" value="<cfoutput>#rs_tag.tag_weight#</cfoutput>" />
							</div>
							
							<hr/>
							
							<div class="label">
								<b>一级指标</b>
								
								<div class="secondRow">
								
									<table>
										<tr>
										<cfset row = 0 />
										<cfset cellPerRow = 4 />
										<cfloop query="rs_level">
											<cfset row++ />
												<td>
													<input name="PTO" type="radio" class="typeRadio" value="<cfoutput>#rs_level.tag_order#</cfoutput>" <cfif left(rs_tag.tag_order,2)&"00" eq rs_level.tag_order>checked="checked"</cfif> /> 
													<cfoutput>#rs_level.question#</cfoutput>
												</td>
											<cfif row mod cellPerRow eq 0>
											</tr>
											<tr>
											</cfif>
										</cfloop>
										<cfif row eq rs_level.recordCount and rs_level.recordCount mod cellPerRow>
											<cfloop from="1" to="#cellPerRow-rs_level.recordCount mod cellPerRow#" index="i">
												<td><!-- <cfoutput>holder<cfoutput>#i#</cfoutput> --></cfoutput></td>
											</cfloop>
										</cfif>
										</tr>
									</table>
								
								</div>
								
							</div>
							
							<div class="label">
								<b>预设答案</b>
								<div class="secondRow">
									<table>
										<cfset row = 0 />
										<cfloop query="rs_measure">
											<cfset row ++ />
											<tr>
												<td><input type="radio" name="Measure" class="typeRadio" value="<cfoutput>#rs_measure.m_id#</cfoutput>" <cfif rs_tag.m_id eq rs_measure.m_id>checked="checked"</cfif> /> <cfoutput>#rs_measure.options#</cfoutput></td>
											</tr>
										</cfloop>
									</table>
								</div>
							</div>
							
							<hr/>
						
							<div class="lable">
								<input class="button" type="submit" value="修改" />
								<cfset structInsert( passArgs, "TAG", tagId, true ) />
								<a class="button2" href="<cfoutput>#buildURL('evaluateSystemTagRemoveDo', passArgs)#</cfoutput>">删除</a>
								<cfset structDelete( passArgs, "TAG" ) />
							</div>

						</form>
						
					</div>
					
				</cfif>
				
			</div>
		</li>
	</ul>
</div>